/***************************************************************
 *  SmartRF Studio(tm) Export
 *
 *  Radio register settings specifed with C-code
 *  compatible #define statements.
 *
 ***************************************************************/

// es muessen noch die richtigen Werte eingesetzt werden
// http://www.bb-europe.com/tech_articles/WP35_868MHz_Radio_Modems.asp

#ifndef SMARTRF_CC1110_H
#define SMARTRF_CC1110_H

//#define SMARTRF_RADIO_CC1110

#define SMARTRF_SETTING_PKTCTRL0  0x05       // Packet Automation Control 
// no whitening, CRC calc/check enabled, variable packet length

#define SMARTRF_SETTING_FSCTRL1   0x08       // Frequency Synthesizer Control 
// IF Wert 8 also ca. 190 kHz
/*
#define SMARTRF_SETTING_FREQ2     0x21       // Frequency Control Word, High Byte 
#define SMARTRF_SETTING_FREQ1     0x71       // Frequency Control Word, Middle Byte 
#define SMARTRF_SETTING_FREQ0     0x7a       // Frequency Control Word, Low Byte 
// 869,525 MHz (???)
*/

#define SMARTRF_SETTING_FREQ2     0x21       // Frequency Control Word, High Byte 
#define SMARTRF_SETTING_FREQ1     0x74       // Frequency Control Word, Middle Byte 
#define SMARTRF_SETTING_FREQ0     0xad       // Frequency Control Word, Low Byte 
// 869,85 (max 5mW), +-150Khz
//FREQ = 2^16 / 26Mhz * Fcarr


#define SMARTRF_SETTING_MDMCFG4   0x7B       // Modem configuration 
// Bandbreite Exp ist 1, M 3 , also 
// d.h Datenrate Exponent ist 11, Bandbreite ca. 230 khz

#define SMARTRF_SETTING_MDMCFG3   0x83       // Modem Configuration 
// Mantisse Datenrate (Symbolrate on air) 131+256 = 387 * 2 ^ 11 / 2 ^28 * Fref =76,7 Khz

#define SMARTRF_SETTING_MDMCFG2   0x13       // Modem Configuration 
#define SMARTRF_SETTING_MDMCFG1   0x22       // Modem Configuration 
#define SMARTRF_SETTING_MDMCFG0   0xf8       // Modem Configuration 
#define SMARTRF_SETTING_DEVIATN   0x42       // Modem Deviation Setting 
#define SMARTRF_SETTING_MCSM0     0x18       // Main Radio Control State Machine Configuration 
#define SMARTRF_SETTING_FOCCFG    0x1D       // Frequency Offset Compensation Configuration 
#define SMARTRF_SETTING_BSCFG     0x1C       // Bit Synchronization Configuration 
#define SMARTRF_SETTING_AGCCTRL2  0xC7       // AGC Control 
#define SMARTRF_SETTING_AGCCTRL1  0x00       // AGC Control 
#define SMARTRF_SETTING_AGCCTRL0  0xB2       // AGC Control 
#define SMARTRF_SETTING_FREND1    0xB6       // Front End RX Configuration 
#define SMARTRF_SETTING_FSCAL3    0xEA       // Frequency Synthesizer Calibration 
#define SMARTRF_SETTING_FSCAL2    0x2A       // Frequency Synthesizer Calibration 
#define SMARTRF_SETTING_FSCAL1    0x00       // Frequency Synthesizer Calibration 
#define SMARTRF_SETTING_FSCAL0    0x1F       // Frequency Synthesizer Calibration 
#define SMARTRF_SETTING_TEST2     0x81       // Various Test Settings 
#define SMARTRF_SETTING_TEST1     0x35       // Various Test Settings 
#define SMARTRF_SETTING_TEST0     0x09       // Various Test Settings 

#define SMARTRF_SETTING_PA_TABLE0 0x50       // PA Power Setting 0 
//-> 0 dbm Output

#define SMARTRF_SETTING_FREND0  // Front end TX configuration
// _> selektiert Power eintrag 0, andere Bits FEHLEN NOCH !!!

#define SMARTRF_SETTING_FSCTRL0 0  // Fre. Synth. prpgramable offset for Freq. Offset corr
//-> könnte dynamisch gesetzt werden

#endif

